<template>
  <div>
    <h1>FGPhoneShow 移动端表单详情</h1>
    <div class="text1">用于展示已填报表单详情</div>
    <div class="coms-form-phone">
      <el-card header="代码" class="coms-form-phone-left">
        <Code :code="phoneShowCode" />
      </el-card>
      <el-card header="演示" class="coms-form-phone-right phone-scroll">
        <FGPhoneShow ref="FGPhoneShow" :value="form" />
      </el-card>
    </div>

    <el-card header="Attributes">
      <Attributes :data="showAttributes" />
    </el-card>
  </div>
</template>

<script>
import { showAttributes, phoneShowCode } from "@/utils/comsData";
import { data } from "@/utils/defaultValue";
import Attributes from "./components/Attributes";
import FGPhoneShow from "@/package/FGPhoneShow";
import Code from "./components/Code.vue";

export default {
  components: { Attributes, FGPhoneShow, Code },
  data() {
    return {
      showAttributes,
      phoneShowCode,
      form: JSON.stringify(data)
    };
  },
  mounted() {
    console.log();
  },
  methods: {}
};
</script>

<style lang="scss" scoped>
.coms-form-phone {
  width: 100%;
  position: relative;
  height: 667px;
  .coms-form-phone-left {
    width: calc(100% - 395px);
    height: 100%;
    ::v-deep .el-card__body {
      height: calc(100% - 62px);
      box-sizing: border-box;
      pre,
      code {
        height: 100%;
        box-sizing: border-box;
      }
    }
  }
  .coms-form-phone-right {
    position: absolute;
    right: 0;
    top: -20px;
    bottom: 0;
  }
}
/* 隐藏滚动条 */
::-webkit-scrollbar {
  display: none;
}

/* 启用滚动 */
.phone-scroll {
  overflow: auto;
  width: 375px;
}
</style>
